#include "junix.h"

struct base {
		base():mem(0){}
		virtual void print(){
				std::cout<<"base::mem "<<mem<<std::endl;
		}
		int mem;
};

struct derived:base{
		derived():mem(99){}
	
		// hide the base print
		void print(int /* =22 */){
				base::print();
				std::cout<<"derived::mem "<<mem<<std::endl;
		}
		int mem;


		// not hide
		///////////////////////////// 
        using base::print;
		//using base::mem;
		////////////////////////////
};

int main() {
	base b;
	derived d;
	b.print();

	//hide the base print

   //	d.print();
	
	base &bb = b;
	base &bd = d;
	bb.print();
	
	// here, not hide the base print and the base::mem
	bd.print();

	d.print(1);
	d.print();
}
